package cz.spock.cms.entity.content;

import javax.persistence.Entity;
import javax.persistence.Id;

/**
 * This class represents the most universal field - the data holder
 * Field is represented by name/label (can be null) and by value of any type.
 * Field's value is supposed to be data object like string, integer, boolean, date...
 * 
 * @author miso
 *
 * @param <T>
 */
@Entity
public class Field<T> {

    @Id
    private Long id;
    
    private String label;
    
    private T value;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public T getValue() {
        return value;
    }

    public void setValue(T value) {
        this.value = value;
    }
    
}
